<template>
  <div>
		<el-row>
			<el-col :span="24"><p>{{$t('m.home.pickingdetail')}}</p></el-col>
			<el-col :span="24" align="right">
				<el-button size="mini" @click="back">{{$t('m.back')}}</el-button>
			</el-col>
		</el-row>
		<el-table
		height="515"
			ref="table"
			stripe
			empty-text
			fit
			v-loading="tableLoading"
			class="table-wrap single-select-table"
			:data="tableData"
			:row-style="tableRowStyle"
			:row-class-name="tableRowClassName"
			@row-click="rowClick"
			@selection-change="handleSingleSelectionChange">
			<el-table-column align="center" type="index" :label="$t('m.index')" width="50"></el-table-column>
			<el-table-column align="center" prop="tasknumber" :label="$t('m.pick.pickingtaskcode')"></el-table-column>
			<el-table-column align="center" prop="quantity" :label="$t('m.out.totalqty')"></el-table-column>
			<el-table-column align="center" prop="expiretime" :label="$t('m.home.overtime')">
				<template slot-scope="scope">{{scope.row.expiretime}}h</template>
			</el-table-column>
		</el-table>
		<el-pagination
			background
			layout="sizes, prev, pager, next, jumper"
			:page-sizes="pageSizeList"
			:page-size="rowSize"
			:current-page="page"
			:total="totalRows"
			@current-change="currentChange"
			@size-change="handleSizeChange"
		></el-pagination>
	</div>
</template>
<script>
export default {
  name:'outbound-picking-table',
  data(){
    return {
      tableData:[]
    }
  },
  mounted(){
    this.getData()
  },
  methods:{
    getData(){
      let options = {
        method:'get',
        url:`/homepage/getexpiredptdlist`,
        params:{
          page:this.page,
          rows:this.rowSize
        }
      }
      // this.tableLoading = true
      this.$axios(options).then(({ data }) => {
        this.tableData = data.records
        this.totalRows = data.total
        this.page = data.current
      })
    },
    back(){
      this.$emit('back')
    }
  }
}
</script>
<style lang="scss" scoped>
.el-table {
	width: 600px;
	margin: 10px 20px;
}
.el-button {
	margin-right: 20px;
}
.el-row .el-col p {
	font-size: 18px;
	margin-top: 10px;
}
.el-pagination {
  position: relative;
}
</style>